﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Hook.Graphics;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Hook.Graphics.SpriteSheets;

namespace Hook.MenuAssets
{
    class ScreenButton : MenuItem
    {
        public Sprite IdleSprite, HoverSprite, SelectSprite;
        public TextSprite TextSprite;

        public Screen NextScreen;

        public ScreenButton(Vector3 Position, string Text, Screen NextScreen)
            : base()
        {
            TextSprite = new TextSprite(Text);
            this.NextScreen = NextScreen;
            this.Position = Position;

            IdleSprite = new Sprite(Game1.PanelSheet, PanelSheet.BUTTONFRAME);
            Dimension = new Vector3(IdleSprite.FrameWidth, IdleSprite.FrameHeight, 0);
            HoverSprite = new Sprite(Game1.PanelSheet, PanelSheet.BUTTONFRAME);
            HoverSprite.Scale = 1.5f;
            SelectSprite = new Sprite(Game1.PanelSheet, PanelSheet.BUTTONFRAME);
            Sprite = IdleSprite;
        }

        public new void Update(GameTime gt)
        {
            base.Update(gt);
            TextSprite.Update(gt);
        }
        public new void Draw(SpriteBatch sb)
        {
            base.Draw(sb);
            TextSprite.Draw(sb);
        }
    }
}
